﻿<div class="blade-content __medium-wide">
    <div class="blade-inner">
        <div class="inner-block">
            <div class="order-status canceled" ng-if="blade.currentEntity.status">
                <div class="status" ng-bind="blade.currentEntity.status"></div>
                <div class="reason" ng-bind="blade.currentEntity.cancelReason" ng-if="blade.currentEntity.isCancelled"></div>
            </div>
            <div class="form-group">
                <label class="form-label">Approved</label>
                <div class="form-input">
                    <label class="form-label __switch">
                        <input type="checkbox" ng-model="blade.currentEntity.isApproved" />
                        <span class="switch"></span>
                    </label>
                </div>
            </div>
            <div class="form columns clearfix">
                <div class="column">
                    <div class="form-group">
                        <label class="form-label">Payment number</label>
                        <div class="form-input">
                            <input required type="text" ng-model="blade.currentEntity.number">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">
                            Status
                            <a href="" ng-click="openStatusSettingManagement()">
                                <i class="form-ico fa fa-pencil"></i>
                            </a>

                        </label>
                        <div class="form-input">
                            <ui-select ng-model="blade.currentEntity.status">
                                <ui-select-match placeholder="Select ...">{{$select.selected}}</ui-select-match>
                                <ui-select-choices repeat="x as x in statuses | filter: $select.search ">
                                    <span ng-bind-html="x | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">Amount</label>
                        <div class="form-input __currency">
                            <span class="currency">{{blade.currentEntity.currency}}</span>
                            <input money required type="text" ng-model="blade.currentEntity.sum">
                        </div>
                    </div>
                </div>
                <div class="column">
                    <div class="form-group">
                        <label class="form-label">from</label>
                        <div class="form-input">
                            <div class="form-text">{{blade.currentEntity.createdDate | date:'short'}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">Payment gateway</label>
                        <div class="form-input">
                            <ui-select ng-model="blade.currentEntity.gatewayCode">
                                <ui-select-match placeholder="Select ...">{{$select.selected.gatewayCode}}</ui-select-match>
                                <ui-select-choices repeat="x.gatewayCode as x in paymentGateways | filter: { gatewayCode: $select.search }">
                                    <span ng-bind-html="x.gatewayCode | highlight: $select.search"></span>
                                </ui-select-choices>
                            </ui-select>

                        </div>
                    </div>
                    <div class="form-group">
                        <label class="form-label">Payment purpose</label>
                        <div class="form-input">
                            <textarea ng-model="blade.currentEntity.purpose"></textarea>
                        </div>
                    </div>
                </div>
            </div>

            <va-widget-container group="paymentDetailWidgets" blade="blade" gridster-opts="{width: 526}"></va-widget-container>
        </div>
    </div>
</div>


